1. Field of the Invention
The present invention relates to Hard Disk Drive (HDD) systems. More particularly, the present invention relates to a system and method for managing defects in a streaming file HDD system that has been optimized for writing and reading audio and/or visual (audiovisual or AV) data.
2. Description of the Related Art
A Hard Disk Drive (HDD) typically has a plurality of disks. Each disk has a plurality of concentric data tracks that have a common index, which represents the start of each track, and a plurality of physical sectors. Each physical sector has a sector number or address. An HDD that has data formatted and stored on the disks of the HDD in fixed-length (i.e., fixed number of bytes) physical sectors is referred to as a Fixed Block Architecture (FBA) HDD.
Sector-level defect management is performed by an HDD when a sector has a defect that is large enough to significantly impact the readability of the disk. The data affected by such a defect is conventionally re-mapped to a new sector contained in a global spare sector pool. Headerless recording formats used by conventional HDDs provide a Logical Block Address (LBA) access technique that allows any bad physical sector to be mapped into another sector that is part of a global spare sector pool.
The data processing workload of an HDD in a computer data-processing environment is characterized by random access patterns of small blocks of data. In contrast, the data processing workload of an HDD in an audio and/or visual (AV) processing environment is characterized by a dominance of large reads and writes of multiple streams that can be interleaved, interspersed with small reads and writes that may post frequently, but contain only small amounts of data. Interleaving, for example, allows a digital video recorder (DVR) to record and play back real-time television and to record two television programs simultaneously. Use of a global spare pool for sector level defect management tends to adversely impact performance of streaming data applications because additional time is required for accessing the global spare sector pool.
Another characteristic of an AV disk drive is that an AV disk drive may spending a significant amount of time waiting for the disk to rotate until the index is detected by the R/W head before the next write can occur, a situation referred to as rotational latency. A variable-index recording technique, such as disclosed by commonly-assigned application Ser. No. 10/227,494, entitled “Method For Writing Streaming Audio/Visual Data To A Disk Drive”, filed Aug. 23, 2002, and incorporated by reference herein, eliminates the adverse impact of rotational latency from performance of a streaming data application. A variable-index recording technique allows a write operation to be performed as soon as the recording head settles on a desired track. The data is written to the first sector encountered in the desired track by creating a virtual index at the first-encountered sector without waiting for the index (i.e., the beginning) of the physical track.
FIG. 1 illustrates an exemplary variable-index recording technique of writing a data cluster of fixed-length logical data blocks B0–B7 to physical sectors S0–S7 of an exemplary data track 100 of an HDD. As used herein, a “data cluster” is the basic unit for an AV stream data and is an integer multiple of a full data track on a disk. Accordingly, when the integer multiple is 1, the one full track corresponds to a single AV data cluster. Similarly, when the integer multiple is 4, four full tracks correspond to a single AV data cluster. Thus, all writes of data are full track writes. An AV data cluster is further organized into an integer number of fixed-length data blocks, similar to a conventional FBA format. It follows that the number of data blocks in an AV data cluster is equal to the number of physical sectors in all the tracks forming the data cluster because the cluster is an integer multiple of full tracks. It should be understood that at least one of the data blocks in a cluster can contain error correction information that has been computed from a group of AV data blocks.
Returning to FIG. 1, each logical block B0–B7 is the size of one physical data sector. Blocks B0–B7 are written to data track 100 using a variable-index recording technique, such as disclosed by application Ser. No. 10/227,494. The most efficient implementation of a variable-index recording technique is to use a “full track” data format in which the read/write data is organized by a Hard Disk Controller (HDC) to occupy a whole data track. Another advantage of a full track data format is that a seek operation is reduced because rotational latency is eliminated, thereby increasing the throughput of the entire storage device. Thus, as shown by the example of FIG. 1, block B0 is written to physical sector S6 because physical sector S6 is the first sector that the head encountered after the head settled on track 100. Next, block B1 is written to data sector S7. Then, block B2 is written to data sector S0, and so on, as shown.
Variable-index recording techniques typically use additional track-level Error Correction Code (ECC), such as parity sectors, for handling large defects on the fly. It is, however, desirable to have the ability to allow track-level ECC to handle large soft errors, and allow sparing to handle hard errors.
What is needed is a sector-level defect management technique having local-track sparing for a headerless-format AV HDD that uses a variable-index writing technique.